package com.skyline.wizard.searcher.impl;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.skyline.wizard.mapper.ArticleObjMapper;
import com.skyline.wizard.searcher.ArticleSearcher;
import com.skyline.wo.model.Article;

@Component("articleSearcher")
public class ArticlerSearcherImpl extends BaseSearcherImpl<Article> implements ArticleSearcher {

	private ArticleObjMapper mapper = null;

	private static final String COLUMN_DIGEST = "digest";
	private static final String COLUMN_TITLE = "title";
	private static final String COLUMN_CATEGORY_NAME = "categoryName";
	
	//private static final Log log=LoggerFactory..getLog(ArticlerSearcherImpl.class);

	@Value("${wizard.articleIndexPath}")
	private String indexPath;

	@PostConstruct
	public void inital() {
		mapper = ArticleObjMapper.getMapper();
		String[] fields = { COLUMN_DIGEST, COLUMN_TITLE, COLUMN_CATEGORY_NAME };
		super.inital(indexPath, mapper, fields);
	}
}
